<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>  
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no"><title></title>
    
<link rel="stylesheet" type="text/css"
    href="<c:url value="/static/css2/css/common.css"/>">
    <link rel="stylesheet" type="text/css"
    href="<c:url value="/static/css2/fonts/iconfont.css"/>">
    <link rel="stylesheet" type="text/css"
    href="<c:url value="/static/css2/css/style.css"/>">
    
    
<link rel="stylesheet" type="text/css"
	href="<c:url value="/static/jquery-easyui/themes/default/easyui.css"/>">
<link rel="stylesheet" type="text/css"
	href="<c:url value="/static/jquery-easyui/themes/icon.css"/>">
<link rel="Stylesheet" type="text/css"
    href="<c:url value="/static/css/jquery.ui.css"/>" />
<script type="text/javascript"
	src="<c:url value="/static/jquery-easyui/jquery-1.6.min.js"/>"></script>
<script type="text/javascript"
	src="<c:url value="/static/jquery-easyui/jquery.easyui.min.js"/>"></script>
<script type="text/javascript"
	src="<c:url value="/static/jquery-easyui/plugins/jquery.panel.js"/>"></script>
<script type="text/javascript"
	src="<c:url value="/static/jquery-easyui/plugins/jquery.datagrid.js"/>"></script>
<script type="text/javascript"
	src="<c:url value="/static/jquery-easyui/plugins/jquery.messager.js"/>"></script>
<script type="text/javascript"
	src="<c:url value="/static/jquery-easyui/ext-for-framework.js.jsp"/>"></script>
<script type="text/javascript"
	src="<c:url value="/static/jquery-easyui/locale/easyui-lang-zh_CN.js"/>"></script>
<script type="text/javascript"
			src="<c:url value="/static/js/common.js"/>"></script>	
<script type="text/javascript"
    src="<c:url value="/static/js/Loading.js"/>"></script>
<script type="text/javascript"
    src="<c:url value="/static/js/showMsg.js"/>"></script>
<script type="text/javascript"
    src="<c:url value="/static/listBox/jquery.clever.listbox.js"/>"></script>	
			
<script type="text/javascript"
            src="<c:url value="/static/js/footer.js"/>"></script>
<script type="text/javascript">
    var dataLeft;
	function initList(listDisplayEId) {
		$('#' + listDisplayEId).datagrid(
				{
					nowrap : false,
					striped : true,
					collapsible : true,
					remoteSort : true,
					notSelectByRow : false,
					/* frozenColumns : [ [ {
						field : 'ids',
						checkbox : true
					} ] ], */
					toolbar : [
							{
								id : listDisplayEId + '_btn_add',
                                text : '新增订单',
                                iconCls : 'icon-add',
                                handler : function() {
                                	
                                	if(document.getElementById('shopId').value==0){
                                		alert("请选择商店！");
                                		return;
                                	}else if($('#ordDate').datebox('getValue')==''){
                                		alert("请选择日期！");
                                		return;
                                	}else{
                                		var new_win = window.open(
                                                "<c:url value='/jsp/openIndexSun.jsp?url=/order/preSelectMaterForSup.do'/>"
                                                        + "?ordCustId="
                                                        + document.getElementById('shopId').value
                                                        + "&ordDate="
                                                        + $('#ordDate').datebox('getValue'),
                                                "sun",
                                                "width=1200px,height=600px,status=no,scrollbars=yes");
                                        new_win.focus();
                                	}
                                }
							},
							{
                                id : listDisplayEId + '_btn_add',
                                text : '回退等待发货状态',
                                iconCls : 'icon-add',
                                handler : function() {
                                    
                                	var row = $('#'+listDisplayEId).datagrid('getSelections');      
                                    if(row.length == 0){
                                        $.messager.alert('提示','请选择一条记录操作！','info');
                                        return;
                                    } else {
                                        var str = "ordId="+row[0]['ordId']+"&ordCustId="+row[0]['ordCustId'] ;    
                                        $.ajax({type:'post',url:"<c:url value='/supporder/renturnSendmater.do'/>"+"?"+str,dataType:"json",//设置查询参数及提交路径
                                            success:function(data){
                                                if(data.success){
                                                    $.messager.alert("提示", "返回成功！", 'warning');
                                                    $('#listDisplay').datagrid('reload');

                                                }else{
                                                    $.messager.alert("提示", data.msg, 'warning');
                                                }
                                            },
                                            error:function(){
                                            $.messager.alert("错误", "系统错误，请联系管理员！", 'error');
                                            }
                                        });
                                    }
                                }
                            },
                            {
                                id : listDisplayEId + '_btn_add',
                                text : '订单审核',
                                iconCls : 'icon-add',
                                handler : function() {
                                    
                                    var row = $('#'+listDisplayEId).datagrid('getSelections');      
                                    if(row.length == 0){
                                        $.messager.alert('提示','请选择一条记录操作！','info');
                                        return;
                                    } else {
                                        var str = "ordId="+row[0]['ordId']+"&ordCustId="+row[0]['ordCustId'] ;    
                                        $.ajax({type:'post',url:"<c:url value='/supporder/reviewOrderSup.do'/>"+"?"+str,dataType:"json",//设置查询参数及提交路径
                                            success:function(data){
                                                if(data.success){
                                                    $.messager.alert("提示", "审核成功！", 'warning');
                                                    $('#listDisplay').datagrid('reload');

                                                }else{
                                                    $.messager.alert("提示", data.msg, 'warning');
                                                }
                                            },
                                            error:function(){
                                            $.messager.alert("错误", "系统错误，请联系管理员！", 'error');
                                            }
                                        });
                                    }
                                }
                            }
                            ,
                            {
                                id : listDisplayEId + '_btn_add',
                                text : '对账完毕',
                                iconCls : 'icon-add',
                                handler : function() {
                                    
                                    var row = $('#'+listDisplayEId).datagrid('getSelections');      
                                    if(row.length == 0){
                                        $.messager.alert('提示','请选择一条记录操作！','info');
                                        return;
                                    } else {
                                        var str = "ordId="+row[0]['ordId']+"&ordCustId="+row[0]['ordCustId'] ;    
                                        $.ajax({type:'post',url:"<c:url value='/supporder/reconciliationForSup.do'/>"+"?"+str,dataType:"json",//设置查询参数及提交路径
                                            success:function(data){
                                                if(data.success){
                                                    $.messager.alert("提示", "对账成功！", 'warning');
                                                    $('#listDisplay').datagrid('reload');
                                                }else{
                                                    $.messager.alert("提示", data.msg, 'warning');
                                                }
                                            },
                                            error:function(){
                                            $.messager.alert("错误", "系统错误，请联系管理员！", 'error');
                                            }
                                        });
                                    }
                                }
                            }
                            ,
                            {
                                id : listDisplayEId + '_btn_add',
                                text : '结款完毕',
                                iconCls : 'icon-add',
                                handler : function() {
                                    
                                    var row = $('#'+listDisplayEId).datagrid('getSelections');      
                                    if(row.length == 0){
                                        $.messager.alert('提示','请选择一条记录操作！','info');
                                        return;
                                    } else {
                                        var str = "ordId="+row[0]['ordId']+"&ordCustId="+row[0]['ordCustId'] ;    
                                        $.ajax({type:'post',url:"<c:url value='/supporder/clearingForSup.do'/>"+"?"+str,dataType:"json",//设置查询参数及提交路径
                                            success:function(data){
                                                if(data.success){
                                                    $.messager.alert("提示", "结算成功！", 'warning');
                                                    $('#listDisplay').datagrid('reload');
                                                }else{
                                                    $.messager.alert("提示", data.msg, 'warning');
                                                }
                                            },
                                            error:function(){
                                            $.messager.alert("错误", "系统错误，请联系管理员！", 'error');
                                            }
                                        });
                                    }
                                }
                            }
                            ,
                            {
                                id : listDisplayEId + '_btn_add',
                                text : '修改订单日期',
                                iconCls : 'icon-add',
                                handler : function() {
                                	if($('#ordDate').datebox('getValue')==''||$('#ordDate').datebox('getValue')== undefined){
                                		alert("请选择要修改的订单时间！");
                                		return ;
                                	}
                                    var row = $('#'+listDisplayEId).datagrid('getSelections');      
                                    if(row.length == 0){
                                        $.messager.alert('提示','请选择一条记录操作！','info');
                                        return;
                                    } else {
                                        var str = "ordId="+row[0]['ordId']+"&ordCustId="+row[0]['ordCustId']+"&orderDate="+$('#ordDate').datebox('getValue') ;    
                                        $.ajax({type:'post',url:"<c:url value='/supporder/updateOrderDate.do'/>"+"?"+str,dataType:"json",//设置查询参数及提交路径
                                            success:function(data){
                                                if(data.success){
                                                    $.messager.alert("提示", "修改成功！", 'warning');
                                                    $('#listDisplay').datagrid('reload');

                                                }else{
                                                    $.messager.alert("提示", data.msg, 'warning');
                                                }
                                            },
                                            error:function(){
                                            $.messager.alert("错误", "系统错误，请联系管理员！", 'error');
                                            }
                                        });
                                    }
                                }
                            }
							],
					onLoadError : function() {
						$.messager.alert('错误', '获取数据失败，请与管理员联系！', 'error');
					},
					onClickRow : function(rowIndex) {
						$(".myrad").prop("checked", false);
						$(".myrad").eq(rowIndex).prop("checked", true);
					}
				});

	};
	$(document).ready(function() {
	    document.getElementById('zzy').style.display = 'none';
	    document.getElementById('zzy2').style.display = 'none';

		initList('listDisplay');
	    document.getElementById('companyId').value = 0;
	    document.getElementById('shopId').value = 0;

		$("#companyName").textbox({
            buttonText : '选择',
            iconAlign : 'left',
            editable : false,
            value : "无",
            multiline : true,
            height : '25px',
            onClickButton : function() {
                initDateLeft();
                showMsgLeft();
                ShowDiv();

                var left = $('#left').listbox();
                var items = left.getDatas();
                left.removeRange(items);

                /* var right = $('#right').listbox();
                var itemsr = right.getDatas();
                right.removeRange(itemsr);
                 */
                $('#left').listbox().reload({
                    data : dataLeft,
                    ajaxsettings : {
                        data : {
                            id : 'a'
                        }
                    }
                });
            }
        });
		
		$("#shopName").textbox({
            buttonText : '选择',
            iconAlign : 'left',
            editable : false,
            value : "无",
            multiline : true,
            height : '25px',
            onClickButton : function() {
                var companyId =  document.getElementById('companyId').value;

                if(companyId =='' ||companyId ==0 || companyId== undefined){
                	companyId = 0 ;
                }
                initDateLeft2(companyId);
                showMsgLeft2();
                ShowDiv2();

                var left = $('#left2').listbox();
                var items = left.getDatas();
                left.removeRange(items);

                /* var right = $('#right').listbox();
                var itemsr = right.getDatas();
                right.removeRange(itemsr);
                 */
                $('#left2').listbox().reload({
                    data : dataLeft,
                    ajaxsettings : {
                        data : {
                            id : 'a'
                        }
                    }
                });
            }
        });
	});
	
	function initDateLeft() {
        $.ajax({
            async : false,
            url : "<c:url value='/quotationCompany/getAllCompanyJsonForSup.do'/>" +"?diy=1",
            type : "post",
            success : function(data) {
                if (typeof (data) == 'string' && data != '') {
                    data = JSON.parse(data);
                }
                dataLeft = data.stringJson;
                if (typeof (dataLeft) == 'string' && dataLeft != '') {
                    dataLeft = JSON.parse(dataLeft);
                }
                
            }
        });
    }
	
	function initDateLeft2(companyId) {
        $.ajax({
            async : false,
            url : "<c:url value='/shop/getShopIdBycompanyIdSupId.do'/>" +"?companyId="+companyId,
            type : "post",
            success : function(data) {
                if (typeof (data) == 'string' && data != '') {
                    data = JSON.parse(data);
                }
                dataLeft = data.stringJson;
                if (typeof (dataLeft) == 'string' && dataLeft != '') {
                    dataLeft = JSON.parse(dataLeft);
                }
                
            }
        });
    }
	function ShowDiv() {
        var Allwidth = '100%';
        var Allheight = '100%';
        document.getElementById('zzy').style.display = '';
        Loading.Show({
            width : Allwidth,
            height : Allheight
        });
    }
	function ShowDiv2() {
        var Allwidth = '100%';
        var Allheight = '100%';
        document.getElementById('zzy2').style.display = '';
        Loading.Show({
            width : Allwidth,
            height : Allheight
        });
    }
    //初始化showMsg
    function showMsgLeft() {
        $('#left').listbox({
            data : dataLeft,
            height : 300,
            width : 200,
            dndscope : 'demo',
            dnd : false,
            multiselect : true,
            selectchange : function(data) {
                if (data && data.length > 0) {
                    $('#btnRight').attr('disabled', false);
                } else {
                    $('#btnRight').attr('disabled', true);
                }
            }
        });
        $('#right').listbox({
            //data: data,
            height : 300,
            width : 200,
            dndscope : 'demo',
            dnd : true,
            multiselect : true
        });
        $('#btnRightAll').click(function() {
            var left = $('#left').listbox();
            var items = left.getDatas();
            left.clear();
            $('#right').listbox().addRange(items);
        });
        $('#btnLeftAll').click(function() {
            var right = $('#right').listbox();
            var items = right.getDatas();
            right.clear();
            $('#left').listbox().addRange(items);
        });
        $('#btnRight').click(function() {
            var left = $('#left').listbox();
            var items = left.getSelected();
            left.removeRange(items);
            $('#right').listbox().addRange(items);
        });
        $('#btnLeft').click(function() {
            var right = $('#right').listbox();
            var items = right.getSelected();
            right.removeRange(items);
            $('#left').listbox().addRange(items);
        });
        $('#btnRemove').click(function() {
            $('#right').listbox().removeRange([ {
                value : 2
            }, {
                value : 26
            } ]);
        });
        $('#btnSelect').click(function() {
            var selected = $('#right').listbox().getSelected();
            var msg = 'Selected count is: ' + selected.length;
            if (selected.length > 0) {
                msg += ', The first item text is: ' + selected[0].text;
            }
            msg += '.';
            alert(msg);
        });
        $('#btnGetItems').click(function() {
            var selected = $('#right').listbox('getDatas');
            alert('Items count is: ' + selected.length);
        });
        $('#btnSetSelection').click(function() {
            $('#left').listbox('setSelection', 1);
        });
        $('#select').click(function() {
            Loading.Hide();
            document.getElementById('zzy').style.display = 'none';

            var right = $('#right').listbox();
            var items = right.getDatas();
            var userNames = '';
            var userIds = '';
            if (items.length > 1) {
                alert("只能选取一位客户");
                return false;
            }

            if (items.length > 0) {
                for ( var e in items) {
                    userNames = userNames + items[e].text + ',';
                    userIds = userIds + items[e].value + ',';
                }
                userNames = userNames.substring(0, userNames.length - 1);
                userIds = userIds.substring(0, userIds.length - 1);
            }
            if (userNames != '' && userIds != '') {
                $('#companyName').textbox('setValue', userNames);
                document.getElementById('companyId').value = userIds;
            } else {
                $('#companyName').textbox('setValue', '无');
                document.getElementById('companyId').value = 0;
            }
        });
        $('#noselect').click(function() {
            Loading.Hide();
            document.getElementById('zzy').style.display = 'none';
        });
    }
    
    function showMsgLeft2() {
        $('#left2').listbox({
            data : dataLeft,
            height : 300,
            width : 200,
            dndscope : 'demo',
            dnd : false,
            multiselect : true,
            selectchange : function(data) {
                if (data && data.length > 0) {
                    $('#btnRight2').attr('disabled', false);
                } else {
                    $('#btnRight2').attr('disabled', true);
                }
            }
        });
        $('#right2').listbox({
            //data: data,
            height : 300,
            width : 200,
            dndscope : 'demo',
            dnd : true,
            multiselect : true
        });
        $('#btnRightAll2').click(function() {
            var left = $('#left2').listbox();
            var items = left.getDatas();
            left.clear();
            $('#right2').listbox().addRange(items);
        });
        $('#btnLeftAll2').click(function() {
            var right = $('#right2').listbox();
            var items = right.getDatas();
            right.clear();
            $('#left2').listbox().addRange(items);
        });
        $('#btnRight2').click(function() {
            var left = $('#left2').listbox();
            var items = left.getSelected();
            left.removeRange(items);
            $('#right2').listbox().addRange(items);
        });
        $('#btnLeft2').click(function() {
            var right = $('#right2').listbox();
            var items = right.getSelected();
            right.removeRange(items);
            $('#left2').listbox().addRange(items);
        });
        $('#btnRemove2').click(function() {
            $('#right2').listbox().removeRange([ {
                value : 2
            }, {
                value : 26
            } ]);
        });
        $('#btnSelect2').click(function() {
            var selected = $('#right2').listbox().getSelected();
            var msg = 'Selected count is: ' + selected.length;
            if (selected.length > 0) {
                msg += ', The first item text is: ' + selected[0].text;
            }
            msg += '.';
            alert(msg);
        });
        $('#btnGetItems2').click(function() {
            var selected = $('#right2').listbox('getDatas');
            alert('Items count is: ' + selected.length);
        });
        $('#btnSetSelection2').click(function() {
            $('#left2').listbox('setSelection', 1);
        });
        $('#select2').click(function() {
            Loading.Hide();
            document.getElementById('zzy2').style.display = 'none';

            var right = $('#right2').listbox();
            var items = right.getDatas();
            var userNames = '';
            var userIds = '';
            if (items.length > 1) {
                alert("只能选取一位客户");
                return false;
            }

            if (items.length > 0) {
                for ( var e in items) {
                    userNames = userNames + items[e].text + ',';
                    userIds = userIds + items[e].value + ',';
                }
                userNames = userNames.substring(0, userNames.length - 1);
                userIds = userIds.substring(0, userIds.length - 1);
            }
            if (userNames != '' && userIds != '') {
                $('#shopName').textbox('setValue', userNames);
                document.getElementById('shopId').value = userIds;
            } else {
                $('#shopName').textbox('setValue', '无');
                document.getElementById('shopId').value = 0;
            }
        });
        $('#noselect2').click(function() {
            Loading.Hide();
            document.getElementById('zzy2').style.display = 'none';
        });
    }
	function formatRadio(value,rowData,rowIndex){
		return value="<input type='radio' class='myrad'  name='radioRole' />";
	}
	function  goDetailedContent(val,rowData,rowIndex){
        return '<a href="#" onclick="constructionManager(\'' + rowData.ordId+ '\',\'' + rowData.ordSupId + '\')">'+val+'</a>  '
    }
	function  goDetailedContent2(val,rowData,rowIndex){
		return '<a href="#" onclick="constructionManager2(\'' + rowData.ordId+ '\')">'+val+'</a>  '
	}
	
	function constructionManager(id,supId) {
		var new_win = window.open("<c:url value='/jsp/openIndexSun.jsp?url=/order/goSupperDetailed.do'/>"+"?id="+id+"&supId="+supId,"sun","width=1200px,height=600px,status=no,scrollbars=yes");
		
		new_win.focus();
	}
	function constructionManager2(id) {
		var new_win = window.open("<c:url value='/jsp/openIndexSun.jsp?url=/order/goSupperDetailedRealSend.do'/>"+"?id="+id,"sun","width=1200px,height=600px,status=no,scrollbars=yes");
		
		new_win.focus();
	}
	//下拉框
	$(function() {        
        // 下拉框选择控件，下拉框的内容是动态查询数据库信息  
        $('#ordState').combobox({   
            data:[{"ordState":"0","ordStateName":"全部"},{"ordState":"3","ordStateName":"待发货"},{"ordState":"4","ordStateName":"已发货待收货"}],   
            editable:false, //不可编辑状态  
            cache: false,  
            valueField:'ordState',     
            textField:'ordStateName',  
        });      
    }); 
	function clearButton(){
		document.getElementById('ordId').value ='';
	    document.getElementById('companyId').value =0;
	    $('#companyName').textbox('setValue', '无');
	    document.getElementById('shopId').value =0;
        $('#shopName').textbox('setValue', '无');
	    $('#ordState').combobox('setValue',0);
		$('#ordDate').datebox('setValue','');
	}
	function searchInfo(){
		
		var ordIdreal =0;
		if(document.getElementById('ordId').value !=''&&document.getElementById('ordId').value != undefined){
			 ordIdreal = document.getElementById('ordId').value;
		}
		
		if($('#ordState').combobox('getValue') ==''){
			$('#listDisplay').datagrid('load', {
				ordId : ordIdreal,
				ordState : 0,
				ordDate : $('#ordDate').datebox('getValue'),
				companyId : document.getElementById('companyId').value,
				ordCustId:document.getElementById('shopId').value
			}); 
		}else{
			$('#listDisplay').datagrid('load', {
                ordId : ordIdreal,
				ordState : $('#ordState').combobox('getValue'),
				ordDate : $('#ordDate').datebox('getValue'),
				companyId : document.getElementById('companyId').value,
				ordCustId:document.getElementById('shopId').value
			});  
		}
	}
	// 颜色
    function cellStyler(value, row, index) {
        if(row['ordPaymentState']==1){
            return 'color:red;';
        }
    }
	
    var xhrUnitChangeBatch;
    function unitChangeBatchAllOrder( ) {

        var ordDate = $('#ordDate').datebox('getValue');
        if(ordDate==''||ordDate==undefined){
        	alert("订单日没有选择!");
        	return false;
        }

        var form = new FormData();
        form.append("ordDate", ordDate); // 可以增加表单数据
        xhrUnitChangeBatch = new XMLHttpRequest();
        xhrUnitChangeBatch.onreadystatechange = unitChangeBatch_return;
        xhrUnitChangeBatch.open(
                        "post",
                        '<c:url value='/order/unitChangeBatchAllOrder.do'/>',
                        true);
        xhrUnitChangeBatch.send(form);
    }
    function unitChangeBatch_return() {
        if (xhrUnitChangeBatch.readyState == 4) {// 4 = "loaded"

            if (xhrUnitChangeBatch.status == 200) {// 200 = OK
                var data;
                data = xhrUnitChangeBatch.responseText;
                if (typeof (data) == 'string' && data != '') {
                    data = JSON.parse(data);
                }
               if(data.success){
                   $.messager.alert("提示", "成功转换所有材料！", 'info');
                   $('#listDisplay').datagrid('reload');
               }
            } else {
                alert("Problem retrieving XML data");
            }
        }
    }
</script>
</head>

<body>
    <br/>
	<table  width='99%'>
		<tr>
		    <td>
			<div style="height: auto; width:100%;background: #fafafa; padding: 5px;" class="easyui-panel" title="查询" iconCls="icon-search" collapsible="true" minimizable="false" maximizable="false" closable="false">
					<form id="searchForm" name="searchForm" method="post"
						action="userlist.txt"
						onsubmit="return searchDGData(this.id,'listDisplay');">
						<div>
		            	<table cellpadding="5">
								<tr>
								    <td>&nbsp&nbsp&nbsp&nbsp</td>
                                    <td>订单号：</td>
                                    <td><input class="easyui-validatebox" editable="true" id="ordId" name="ordId"></input></td>
                                    <td>&nbsp&nbsp&nbsp&nbsp</td>
								    <td>公司</td>
                                    <td><input style="word-wrap: break-word; word-break: break-all;" id="companyName" name="companyName"></input></td>
                                    <td><input class="easyui-validatebox" editable="false" id="companyId" name="companyId" type="hidden"></input></td>
                                    <td>&nbsp&nbsp&nbsp&nbsp</td>
									<td>商店</td>
                                    <td><input style="word-wrap: break-word; word-break: break-all;" id="shopName" name="shopName"></input></td>
                                    <td><input class="easyui-validatebox" editable="false" id="shopId" name="shopId" type="hidden"></input></td>
									<td>&nbsp&nbsp&nbsp&nbsp</td>
									<td>订单状态：</td>
									<td><input class="easyui-combobox" id="ordState" editable="false" name="ordState"></input></td>
									<td>&nbsp&nbsp&nbsp&nbsp</td>
									<td>订单日期：</td>
									<td><input class="easyui-datebox" editable="true" id="ordDate" name="ordDate"></input></td>
                                    <td>&nbsp&nbsp&nbsp&nbsp</td>
                                    <td><input type="button" onclick="clearButton()" value="清空"></td>
                                    <td>&nbsp&nbsp&nbsp&nbsp</td>
		                    		<td><input type="button" onclick="searchInfo()" value="查询"></td>
		                    	</tr>
		                </table>					 
						</div>
					</form>
				</div>
			</td>
		</tr>
	</table>
		<br/>
	<table  width='99%'>	
		<tr><td>
				<table id="listDisplay" title="供应商订单列表" singleSelect=true
					iconCls="icon-list" idField="id"
					url="<c:url value="/supporder/findSuppOrder.do"/>"
					style="width: 100%;" loadMsg="请稍候......"
					pagination="true" pageSize="10"
					pageList="[10,20,30,40,50,100,150,200]" sortName="roleId"
					rownumbers="true" sortOrder="asc" showFooter="true">
					<thead>
						<tr>
						    <th field="id" width="25" align="center"  checkbox="true">
							</th> 
						    <th field="ordId" width="50"  sortable="true" >
								订单ID
							</th>	
 							<th field="ordCustId" width="80" sortable="true" hidden="true">
								客户ID
							</th>	
							<th field="ordCustName" width="80" sortable="true" >
								客户名
							</th>	
							<th field="code" width="55" sortable="true">摊位号
                            </th>   
							<th field="ordSupId" width="80" sortable="true" hidden="true">
								供货商ID
							</th>		
							<th field="ordSupName" width="90" sortable="true" >
								供货商名
							</th>	
							<th field="ordState" width="80"  formatter="formatOrdStateSupper" sortable="true" >订单状态
                            </th>   
                            <th field="ordStateSup" width="80"  formatter="formatOrdStateSupperForSup" sortable="true" >采购审核
                            </th>   
							<th field="ordPaymentState" width="60" formatter="formatOrdPaymentState" sortable="true"  styler="cellStyler" >结款状态
                            </th> 
                            <th field="commitDeliverState" width="80" formatter="formatCommitDeliverState" sortable="true" >材料实际重量
                            </th>   
							<th field="ordDate" width="80" sortable="true" >
								订单日期
							</th>
							<th field="ordDay" width="60"  sortable="true" >
								订单日
							</th>	
							<th field="ordValueRealCost" width="70"  sortable="true" >进货总价
                            </th>  
                            <th field="ordValueReal" width="70"  sortable="true" >送货总价
                            </th>
                            <th field="turnover" width="70"  sortable="true" >营业额
                            </th>  
                            <th field="grossMargin" width="50"  sortable="true" >毛利率
                            </th>  
                            <th field="content" width="100" formatter="goDetailedContent" sortable="true" >查看订单详细内容
                            </th>
							<!-- 
							<th field="content" width="110" formatter="goDetailedContent" sortable="true" >
								进入修改品级页面
							</th>	
							<th field="content2" width="110" formatter="goDetailedContent2" sortable="true" >
								查看实际送货内容
							</th>	
							 -->	
 						</tr>
				</thead>
			</table>
		</td></tr>
	</table>
	
	<!--右侧菜单栏购物车样式-->
    <div class="fixedBox">
        <ul class="fixedBoxList">
            <!-- <li class="fixeBoxLi user"><a href="User.html"> <span class="fixeBoxSpan iconfont icon-yonghu"></span> <strong>用户</strong></a> </li>
    <li class="fixeBoxLi cart_bd" style="display:block;" id="cartboxs">
        <p class="good_cart">0</p>
            <span class="fixeBoxSpan iconfont icon-cart"></span> <strong>购物车</strong>
            <div class="cartBox">
            <div class="bjfff"></div><div class="message">购物车内暂无商品，赶紧选购吧</div>    </div></li> -->

            <li class="fixeBoxLi Home"><a onclick="unitChangeBatchAllOrder();">
                    <span class="fixeBoxSpan iconfont  icon-shoucang"></span> <strong>根据时间改变单位</strong>
            </a></li>
            <li class="fixeBoxLi BackToTop"><span
                class="fixeBoxSpan iconfont icon-top"></span> <strong>返回顶部</strong>
            </li>
        </ul>
    </div>
    
    <div
        style='position: absolute; left: 40px; top: 40px; z-index: 101; background-color: #FFFFFF; border-radius: 10px; width: 550px;'
        id="zzy">
        <table align="center">
            <!-- <tr>
                <td colspan="3">
                    <form id="searchFormForShowCust" name="searchFormForShowCust"
                        method="post" accept-charset="UTF-8">
                        <div
                            style="height: auto; width: 470px; background: #fafafa; padding: 5px;"
                            class="easyui-panel" title="查询" iconCls="icon-search"
                            collapsible="true" minimizable="false" maximizable="false"
                            closable="false">
                            <table>
                                <tr>
                                    <td>省:</td>
                                    <td><input class="easyui-combobox" name="provinceShow"
                                        id="provinceShow" required="true" /></td>
                                    <td>市:</td>
                                    <td><input class="easyui-combobox" name="cityShow"
                                        id="cityShow" required="true" /></td>
                                </tr>
                                <tr>
                                    <td>区:</td>
                                    <td><input class="easyui-combobox" name="countryShow"
                                        id="countryShow" required="true" /></td>
                                    <td colspan="2"><a href="#" class="easyui-linkbutton"
                                        data-options="iconCls:'icon-search'" style="width: 60px"
                                        onclick="searchInfoForShowCust()">查询</a></td>
                                </tr>
                            </table>
                        </div>
                    </form>
                </td>
            </tr> -->
            <tr>
                <td>
                    <ul id="left">
                    </ul>
                </td>
                <td><input type="button" value="&gt;&gt;" id="btnRightAll"
                    style="width: 50px;" /><br /> <input type="button" value="&gt;"
                    id="btnRight" style="width: 50px;" /><br /> <input type="button"
                    value="&lt;" id="btnLeft" style="width: 50px;" /><br /> <input
                    type="button" value="&lt;&lt;" id="btnLeftAll" style="width: 50px;" /></td>
                <td>
                    <ul id="right">
                    </ul>
                </td>
            </tr>
        </table>
        <table align="center">
            <tr>
                <!--  
                <td><input type="button" value="Add Item" id="btnAdd" /></td>
                <td><input type="button" value="Remove Item" id="btnRemove" /></td>
                <td><input type="button" value="Get Select" id="btnSelect" /></td>
                <td><input type="button" value="Get Items" id="btnGetItems" /></td>
                <td><input type="button" value="SetSelection (value equal to '1')" id="btnSetSelection" /></td>
                <td><input type="button" value="Reload" id="btnReload" /></td>
                -->
                <td><input type="button" value="取消" id="noselect" /></td>
                <td width="200px"></td>
                <td><input type="button" value="选择" id="select" /></td>

            </tr>
        </table>
    </div>
    <div
        style='position: absolute; left: 40px; top: 40px; z-index: 101; background-color: #FFFFFF; border-radius: 10px; width: 550px;'
        id="zzy2">
        <table align="center">
           
            <tr>
                <td>
                    <ul id="left2">
                    </ul>
                </td>
                <td><input type="button" value="&gt;&gt;" id="btnRightAll2"  style="width: 50px;" /><br />
                    <input type="button" value="&gt;"     id="btnRight2" style="width: 50px;" /><br /> 
                    <input type="button" value="&lt;" id="btnLeft2" style="width: 50px;" /><br /> 
                    <input type="button" value="&lt;&lt;" id="btnLeftAll2" style="width: 50px;" /></td>
                <td>
                    <ul id="right2">
                    </ul>
                </td>
            </tr>
        </table>
        <table align="center">
            <tr>
                <!--  
                <td><input type="button" value="Add Item" id="btnAdd" /></td>
                <td><input type="button" value="Remove Item" id="btnRemove" /></td>
                <td><input type="button" value="Get Select" id="btnSelect" /></td>
                <td><input type="button" value="Get Items" id="btnGetItems" /></td>
                <td><input type="button" value="SetSelection (value equal to '1')" id="btnSetSelection" /></td>
                <td><input type="button" value="Reload" id="btnReload" /></td>
                -->
                <td><input type="button" value="取消" id="noselect2" /></td>
                <td width="200px"></td>
                <td><input type="button" value="选择" id="select2" /></td>

            </tr>
        </table>
    </div>
</body>
</html>